function turnPage(num,myform){
	var currentPage=parseInt(document.getElementById("currentPage").value);
	var totalPage=parseInt(document.getElementById("totalPage").value);
	if(num=="1"){
		//首页
		document.getElementById("currentPage").value=1;
	}else if(num=="2"){
		//上一页
		document.getElementById("currentPage").value=currentPage-1;
	}else if(num=="3"){
		//下一页
		document.getElementById("currentPage").value=currentPage+1;
	}else if(num=="4"){
		//尾页
		document.getElementById("currentPage").value=totalPage;
	}else if(num=="5"){
		//跳转页面
		var reg = /^\d+$/;
		var page=document.getElementById("page").value;
		if(page==""){
			alert("页数不能为空!");
			return false ;
		}
		if( page.constructor === String ){
			var re = page.match(reg);
			if(re==null){
				alert("您输入的页码必须为数字！");
				document.getElementById("page").value="";
	        	return false;
	        }
	    }
		
		document.getElementById("currentPage").value=page;
	}
	
	document.getElementById(myform).method="post";
	document.getElementById(myform).submit();     
}